package entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import vo.ArticuloVO;
import vo.ModaVO;

@Entity
@Table(name="moda")
public class Moda extends Articulo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Column(name="color")
	private String color;
	@Column(name="talle")
	private String talle;
	
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public String getTalle() {
		return talle;
	}
	public void setTalle(String talle) {
		this.talle = talle;
	}
	
	public ModaVO getVO(){
		

		ArticuloVO avo = super.getVO();
		ModaVO movo = new ModaVO();
		
		movo.setCategoria(avo.getCategoria());
		movo.setCodigo(avo.getCodigo());
		movo.setDescripcion(avo.getDescripcion());
		movo.setMarca(avo.getMarca());
		movo.setNombre(avo.getNombre());
		movo.setOrigen(avo.getOrigen());
		movo.setPrecio(avo.getPrecio());
		movo.setRanking(avo.getRanking());
		movo.setFecha(avo.getFecha());
		
		movo.setFoto(super.getFoto());
		movo.setColor(this.color);
		movo.setTalle(this.talle);
		
		return movo;
		
	}
	
}